<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
            <li class="active"><a href="{:url('score/index')}">商品列表</a></li>
            <li><a href="{:url('score/add')}">添加商品</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="post" action="{:url('score/index')}">
            商品名称:
            <input type="text" class="form-control" name="name" value="{:input('request.name/s','')}" placeholder="请输入商品名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('score/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
                    <th width="50">ID</th>
                    <th>商品名称</th>
                    <th>商品图片</th>
                    <th>所需金额</th>
                    <th>所需积分</th>
                    <th>状态</th>
                    <th>所属店铺</th>
                    <th>添加时间</th>
                    <th>操作</th>
				</tr>
			</thead>
			<tbody>
                <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td><img style="width:50px;height:50px;" src="{$vo.img}" alt=""></td>
                        <td>{$vo.price}</td>
                        <td>{$vo.score}</td>
                        <td>{$vo['status'] == 1 ? '上架' : '下架'}</td>
                        <td>{$vo.shopname}</td>
                        <td>{$vo.addtime}</td>
                        <td>
                            <a class="btn btn-xs btn-primary" href="{:url('score/edit',array('id'=>$vo['id']))}">修改</a>
                            <a class="btn btn-xs btn-danger" href="{:url('score/delete',array('id'=>$vo['id']))}">删除</a>
                        </td>
                    </tr>
                </foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>